<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminApplyDraftTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_apply_draft', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id');
            $table->string('user_name')->default('')->comment('姓名');
            $table->integer('id_card_number')->comment('身份证');
            $table->string('phone')->default('')->comment('手机号');
            $table->string('source')->nullable()->comment('来源/公司名称');
            $table->string('work_type')->nullable()->comment('报名工种');
            $table->string('level')->nullable()->comment('级别');
            $table->text('work_experience')->nullable()->comment('工作经历');
            $table->string('card_front_image')->nullable()->comment('身份证正面');
            $table->string('card_back_image')->nullable()->comment('身份证背面');
            $table->string('head_image')->nullable()->comment('头像');
            $table->text('diploma_image')->nullable()->comment('毕业证或学历备案表');
            $table->text('social_security_image')->nullable()->comment('社保证明');
            $table->text('skill_image')->nullable()->comment('职业技能等级证书');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_apply_draft');
    }
}
